Method and apparatus for automatically providing network services

ABSTRACT

An embodiment of the invention is directed to a method and apparatus for automatically providing network services in a way that improves upon the prior art. Systems implementing aspects of the invention can, for instance, provide developers with a mechanism for creating Web Services without having to write low-level SOAP, XML, or WSDL code. The system utilizes a rule-based approach to provide a mechanism for dynamically reconfiguring the system with requiring redeployment of the entire system.

FIELD OF THE INVENTION

[0001] The invention relates to the field of computer software. Moreparticularly, the invention is directed to computer software configuredto enable systems to provide network services.

BACKGROUND

[0002] Computer networks provide users with an efficient way to shareinformation. It is commonplace, for example, for users to exchange datausing collaborative applications such as email or access storedinformation using other data retrieval applications. One of the morewidely used data retrieval applications is referred to as a web browser.Web browsers are typically configured to obtain data from a World WideWeb of interconnected server computers (hereinafter the Web) using anumber of standardized data communication protocols. The Web utilizes aclient-server architecture made up of multiple client computersexecuting a Web Browser application that handles connecting to andretrieving information from one or more server applications.

[0003] Once the requested information is retrieved, the Web Browserapplication parses the obtained information and displays aspects of thatinformation to the user. For example, a user may utilize a Web Browserto access a web site that provides information served in the form ofHyper-Text Markup Language (HTML) or in Extended Markup Language (XML).The portions of HTML or XML information that relate to componentsintended for display are presented to the user via a standard computerdisplay.

[0004] The server computer(s) executing at the web site are configuredto handle requests for information by executing a suite of applications.One such a web server application handles requests to transfer data(e.g., HTTP requests), whereas Common Gateway Interface (CGI) programshandle access to data stored in a database and can generate HTMLdocuments that are then transmitted to the requesting user. A web serverwill typically invoke a CGI program when the system receives a requestfrom a client for a particular script. Practical Extension ReportingLanguage (PERL) scripts and other server side scripting languages areexamples of the type of scripts often handled using CGI. Although suchscripts can fulfill many system needs, a problem with using CGI scriptsis that the scripts become increasingly difficult to create whenutilized to access complex data sources or dynamically provideinformation.

[0005] Due in large part to the complexity involved when using thescripting approach, those of ordinary skill in the art often prefer touse Application Servers in lieu of writing complex scripts. ApplicationServers have far more flexibility and can provide an effective mechanismfor accessing databases and generating output documents using aframework that enables developers to add new functionality and handletasks such as object persistence, session management, and fail-overprotection. However, programming an interface to an Application Serveris made difficult by the fact that most systems do not have a tightlyconstrained set of end-users. Since it is increasingly common forbusinesses to provide business-to-business services involving multipletypes of end-users, there is a need for a more flexible approach tobuilding Application Server interfaces.

[0006] When developing server applications for electronic dataproviders, developers face several challenges. The end-users of suchsystems are generally not pre-defined. Adequately serving the needs ofthese users requires that the functions implemented to serve the datamade available by the system be modified, or new functions added everytime the data representation relating to the served data is modified ornew data content added. To minimize the cost of adding new functionalityor modifying existing ones, an efficient architecture for interfacingwith an Application Server or some other data source is needed. Itwould, for example, be highly desirable if developers could reuseexisting program code, minimize the number of locations where the sourcecode must be altered, and prevent alterations in some parts of the codethat affect other functions if such effect is not intentional.

[0007] A breed of Web application called Web Services, provides a way toresolve some of the problems and accomplish some of the goals statedabove. Web Services are self-contained, self-describing, modularapplications that can be published, located, and invoked across the Web.Web Services perform functions, which can be anything from simplerequests to complicated business processes. Once a Web Service isdeployed, other applications (and other Web services) can discover andinvoke the deployed service.

[0008] Viewed from an application architecture perspective, Web Servicesprovide a method that enables programmatic access to a service which isthen implemented by other kinds of software (e.g., middleware). Accessis achieved through the use of a listener and an interface for exposingoperations supported by a business logic implemented by a traditionalmiddleware platform. The Web Service architecture segments the servicesit provides into discrete functional components generally destined foruse by other server-side software (e.g. CGI programs). Thecomponent-based model involves blocks of software program code, whichprogrammers may reuse to extend the system's capabilities. To exchangedata between servers associated with different business entities,Application Servers at each of the different business entitiescommunicate using mutually recognizable data communication protocols. Anoverview of the various protocols and components of the Web Servicesplatform is helpful for purposes of understanding how the architectureis adapted to provide various services.

[0009] The basic platform upon which Web Services are based utilizeseXtensible Markup Language (XML), plus Hyper-Text Transport Protocol(HTTP). HTTP is a ubiquitous protocol that acts as the basic mechanismfor transporting data across the Web. XML provides a metalanguage fordevelopers to write specialized languages to express complexinteractions between clients and services or between components of aservice. At the server level the XML data acts as a message that getsconverted to a middleware request and the results converted back to XML.Platform support services, such as discovery, transactions, security,authentication, etc . . . are provided by other services such as SOAPand the Web Services Definition Language (WSDL). Thus, a fullyfunctioning Web Services platform can be thought of asXML+HTTP+SOAP+WSDL+Universal Description, Discovery and IntegrationService (UDDI). At higher levels, one might also add technologies suchas XAML, XLANG, XKMS, and XFS, although such services are notuniversally accepted as a mandatory part of the Web Services platform.

[0010] Even though some of the protocols have overlapping functionality,each protocol is generally used for a specific purpose. SOAP, forinstance, provides remote invocation, UDDI acts as a kind oftrader/directory service, WSDL enables the system to express servicecharacteristics, XLANG/XAML provides transaction support for complex webtransactions involving multiple web services, and XKMS supportsauthentication and registration.

[0011] SOAP as it is understood by those of ordinary skill in the art isa protocol that defines a uniform way of passing XML-encoded databetween computers. SOAP also defines a way to perform Remote ProcedureCalls (RPCs) using HTTP as the underlying communication protocol. Forexample, SOAP provides a framework for describing data using XML totransfer data between computers using existing network infrastructures.

[0012] UDDI provides a mechanism for client computers to dynamicallylocate other web services. This enables business using a UDDI interface,to dynamically connect to services provided by other businesses. A UDDIregistry can be thought of as a lookup service for businessapplications. A UDDI registry has two kinds of clients: businesses thatwant to offer a service (and its usage interfaces), and clients who wantto obtain and use the offered service. UDDI is layered over SOAP andassumes that requests and responses are UDDI objects sent as SOAPmessages.

[0013] WSDL provides a way for service providers to describe the basicformat of Web Service requests over different protocols or encodings.WSDL is used to describe what a Web Service can do, where it resides,and how to invoke it. WSDL typically assumes SOAP/HTTP/MIME are toprovide the remote object invocation mechanism. UDDI registries describenumerous aspects of Web Services, including the binding details of theservice. Thus, WSDL fits into the subset of a UDDI service description.

[0014] WSDL defines services as collections of network endpoints orports. In WSDL the abstract definition of endpoints and messages isseparated from the network deployment or data format bindinginformation. This allows the reuse of abstract definitions of messages(e.g., descriptions of the data being exchanged and collections ofoperations such as port types). The protocol and data format informationrelating to a particular port type constitutes a reusable binding. Aport is defined by associating a network address with a reusablebinding. Each collection of ports is what defines a service. A WSDLdocument typically defines a network service using the followingelements:

[0015] Types—a container for data type definitions using some typesystem (such as XSD).

[0016] Message—an abstract, typed definition of the data beingcommunicated.

[0017] Operation—an abstract description of an action supported by theservice.

[0018] Port Type—an abstract set of operations supported by one or moreendpoints.

[0019] Binding—a concrete protocol and data format specification for aparticular port type.

[0020] Port—a single endpoint defined as a combination of a binding anda network address.

[0021] Service—a collection of related endpoints.

[0022] So, put simply, WSDL is a template for how services can bedescribed and used by client computers.

[0023] A limitation in using these existing technologies to provide WebServices is that developers must manually write code to access datasources, provide functions called by clients, and retrieve or modify thedata in the data source. This is a laborious process. When the datasource is modified (e.g. by modifying a database schema), the developeris required to manually modify the source code for any Web Servicesaffected by alterations to the data source. This requires that thedeveloper have an intimate level of knowledge about the source codestructure. For the companies that need to maintain such systems, thisprocess is costly and particularly so, when the developer doing themaintenance is different from the one who performed the initialdevelopment. Moreover, each time there is a need to modify the databaseschema, the developer is required to modify many parts of the sourcecode and propagate each of these changes to the clients that interfacewith the system. When an operation is to be added or modified, allaffected services with which the operation (or operation type) isassociated may require modification.

[0024] To reduce the development and deployment time, there is a needfor a method and framework that assists developers and other users withthe process of providing network services (e.g. web services) toend-users and facilitates the development and deployment of such networkservices.

DESCRIPTION OF THE DRAWINGS

[0025]FIG. 1 depicts an architecture for enabling systems to provide webservices in accordance with one or more embodiments of the invention.

[0026]FIG. 2 illustrates the steps involved in developing and servingnetwork services in accordance with one or more embodiments of theinvention.

[0027]FIG. 3 depicts an example interface for providing schemainformation to assist with the configuration of network services inaccordance with one or more embodiments of the invention.

[0028]FIG. 4 depicts an example interface for providing configurationinformation related to one or more web services in accordance with oneor more embodiments of the invention.

[0029]FIG. 5 illustrates the steps involved in generating rule sets thatgovern the creation and serving of network services in accordance withone or more embodiments of the invention.

[0030]FIG. 6 is a block diagram illustrating the processes involved inproviding network services in accordance with one or more embodiments ofthe invention.

[0031]FIG. 7A and FIG. 7B illustrate a mechanism for providing networkservices in accordance with one or more embodiments of the invention.

[0032]FIG. 8A and FIG. 8B illustrate the process for handling a requestto a Web Service in accordance with one or more embodiments of theinvention.

[0033]FIGS. 9A and 9B illustrate the process for generating WSDL data inaccordance with one or more embodiments of the invention.

[0034]FIG. 10A and FIG. 10B illustrate the process for invoking a WebService in accordance with one or more embodiments of the invention.

[0035]FIGS. 11A and 11B illustrate the process for dynamically handlingWeb Service objects and the creation and execution of operations objectsin accordance with one or more embodiments of the invention.

[0036]FIG. 12A and FIG. 12B illustrate the process for utilizing rulebased serializers and deserializers in accordance with one or moreembodiments of the invention.

SUMMARY OF THE INVENTION

[0037] An embodiment of the invention is directed to a method andapparatus for automatically providing network services in a way thatimproves upon the prior art. Systems implementing aspects of theinvention can, for instance, provide developers with a mechanism forcreating Web Services without having to write low-level SOAP, XML, orWSDL code. The system utilizes a rule-based approach that enablesadministrators and other users to dynamically adjust the system toinclude or exclude certain network services without having to engage ina complex redeployment effort.

[0038] The term network services as it is utilized herein, means theprovision of a requested service between two or more parties using aclient-server architecture to communicate data relating to the requestedservice. Typically, client computers request services from a servercomputer. The server is configured to dynamically provide the requestedservice by interfacing with one or more rules and data sources to obtainthe data needed to perform the requested service.

[0039] A type of network service referred to as a Web Service is anexample of a widely used network services. Web Services are supported byseveral standards for posting requests between clients and servers, andfor encoding streams of data/objects. In one embodiment of theinvention, requests and responses are posted between clients and serversusing HTTP, and data messages relating to the provision of the requestedservice are encoded using SOAP. In such instances, these Web Servicesare supported using the WSDL to describe XML data objects.

[0040] Systems implementing one or more aspects of the invention utilizea highly modularized architecture. These modules are built around a ruleengine that can infer most aspects of the system's behavior.

[0041] At the receiving end of the system, the requests are analyzed tocheck whether a request is destined for a network service (e.g., a WebService). When the system receives a request for a Web Service, thesystem parses the message contained in the request under the supervisionof the rule engine which can determine: the name of the Web Service, theoperations necessary to respond to the request, and the arguments thatallow the operations to execute and generate a response.

[0042] The system is capable of invoking the rule engine at any step ofthe processing and can evaluate request values on invocation. Thisability provides administrators or users with a mechanism fordynamically reconfiguring the system with requiring redeployment of theentire system. Thus, an embodiment of the invention allows updates orchanges to the system without requiring a start and stop of the system.

[0043] One aspect of the invention relates to implementing thecapability to generate rules to govern such processing. Embodiments ofthe invention include an assistance tool that enables developers tospecify the data schema of one or more data sources, the names of WebServices to be implemented, and other parameters relating to the WebService such as properties and configuration parameters. In addition,the assistance tool, or simply the network services assistant, iscapable of reverse engineering the schema and including the schemainformation into the web services definitions. The developer is alsoable, using the network services assistant, to manually addfunctionality to the system by entering specific rules. Once the networkservices assistant obtains the data schema and a set of configurationparameters the network services assistant generates a set of rulesutilized by the rule engine at run-time. These rules direct the networkservices assistant to execute the proper component in order to handle aWeb Services request.

[0044] The architecture implemented by one or more embodiments of theinvention improves upon current systems in that it allows for greatercontrol over the handling of inputs, processing and the generation ofoutputs during the provision of network services. Furthermore, byconcentrating the control mechanism in a rule system, the architectureallows a developer to drastically change the system's behavior simplymodifying rules, without requiring alteration of the source code modulesassociated with each network service.

DETAILED DESCRIPTION

[0045] Embodiments of the invention are directed to an improved methodand apparatus for automatically providing network services. In thefollowing description numerous specific details are set forth in orderto provide a more thorough understanding of the invention. In someinstances, well-known features have not been described in detail so asnot to obscure certain aspects of the invention. It will be apparent,however, to an artisan of ordinary skill, that it is possible topractice the present invention without these specific details or byusing well-know techniques, equivalents or alternatives to the specificexamples given. As such, this detailed description of preferred andalternative embodiments should not be construed to limit the scope orbreadth of the present invention. The claims and the full scope of anyequivalents are what define the meets and bounds of the invention.Moreover, the reader should note that the invention described hereinleverages technologies described in U.S. patent application Ser. No.09/618,390 entitled “Dynamic Generation and Automated Distribution ofUser Interface from Database model” (filed on Jul. 18^(th), 2000) andincorporated herein by reference.

[0046] Terminology

[0047] Throughout the following disclosure, the term user refers to aperson using a computer application and/or to one or more automaticprocesses. The automatic processes may include a computer programexecuting locally or on a remote computer, and may be triggered tocommunicate with embodiments of the invention following an event. Usageof the term client is without distinction as to whether the client is auser's application, a client machine or another server.

[0048] The term server is used to refer to any functional entity thatprovides services to a requestor. Thus, the term server can refer to aset of one or more physical machines or software executing on one ormore machines. It should be clear to a person of ordinary skill in theart of computer programming that the term machine may refer to thephysical hardware itself, or to a virtual machine such as a JAVA VirtualMachine (JVM), or even to separate virtual machines running differentOperating Systems on the same physical machine and sharing thatmachine's computing resources.

[0049] It should be assumed that references made to client and serverconnections, or even generalized network connections, do not necessarilyinvolve the user of a physical network such as an Ethernet network.Clients and servers may reside on the same machine and thus suchconnections can be local to one machine. This is the case, for example,on web sites running on a supercomputer. In the latter case, both webservers (e.g. Apache™ Web Server) and one or more Application Serversmay execute within the same physical machine or on different virtualmachines. The network connecting the virtual machines is in this case avirtual network. Embodiments of the invention are capable of running onsuch virtual networks.

[0050] The term data source refers to any mechanism or protocol forstoring and retrieving computer data files. In its simplest form, a datasource is a flat file residing on a file system. However, an electronicmail server, or a directory services server (e.g., an Lightweight AccessDirectory Protocol, etc . . . ), a database, or any other type of datarepository can all function as data sources. Thus, references to theterm database are interchangeable with the term data source. In the caseof relational databases, a schema is conventionally used (e.g. starschema) to refer to the structure/organization of data in the relationaldatabase. Therefore, throughout this disclosure references to a databaseschema should be viewed as referring to the general data structure ororganization that distinctly characterizes the data source in question(e.g. electronic mail server or directory services server). Moreover,the term developer as used herein is not limited to those with computerprogramming skills, but means any computer user or person regardless ofthe level of technical skill associated with that person.

[0051] The invention is implemented as a computer program based on amodularized architecture as will be detailed below. The system isdesigned to implement each component as a part of a large infrastructure(e.g. within an Application Server) or as a plug-in or applet embeddedwithin, or interfaced with third party applications.

[0052] High-Level System Overview

[0053]FIG. 1 is a block diagram depicting an architecture for enablingsystems to provide network services such as Web Services. When client150 issues a request to a system implementing the invention, applicationserver 140 initially handles the request by performing multiple checksto determine the validity and/or type of the request being made.Application server 140 contains one or more components for handlingthese requests and may, for instance, utilize these components todetermine what object type to map a particular request.

[0054] Application server 140 is configured to have the ability to checkone or more rules associated with the request against rule store 130.Rule store 130 provides a rule set for accessing, manipulating and/orserving data from a data source such as database 120. Developer 100defines the rule set contained within rule store 130 and may, forinstance, manually input rules and/or utilize the network servicesassistant 110 described herein to construct rules for accessing data inone or more data sources (e.g., database 120) and providing networkservices relating to that data.

[0055] The network services assistant allows a user to easily developserver-side services and publish those services to a client-sideapplication. For example, when a service is created and a systemimplementing one or more aspects of the invention adds operationsrelating to that service, the service provider can publish a documentcontaining a Uniform Resource Locator configured to enable the client toautomatically connect back to the proper service. Also, in thearchitecture provided by the invention, simply changing the rules caneasily change a system's behavior.

[0056]FIG. 2 illustrates the steps for developing and serving networkservices in accordance with one or more embodiments of the invention. Atstep 210, a system implementing the invention receives a developer'sinput. In the large majority of cases, but not all cases, a developerthrough the use of the network services assistant selects one or moredata sources (e.g. relational databases, Lightweight Directory Access,Electronic mail systems, etc . . . ) and inputs one or more parametersrelating to the selected data source. Some examples of such parametersinclude data defining subsets within the data source, the creation ofaliases, constraints on a particular data selection, or data used toclassify and define a type of data within the data source.

[0057] At step 220 the system obtains information about the data source.This information describes the structure and organization of the data inthe data source. In the case of a relational database, the informationis a relational schema that describes how data fields are organized inthe database tables and how tables are linked to each other in thedatabase. In select embodiments of the invention the system obtains therelational database schema via a flat file or any other data source. Thesystem is also capable of reverse engineering a relational database togenerate a description for the database. At step 220, a systemimplementing the invention may use one or more database connectivityinterfaces (e.g. JAVA Database Connectivity “JDBC” or Open DatabaseConnectivity “ODBC”) to connect to a relational database and obtain anappropriate database schema.

[0058] The system can analyze the data source information to determinethe data types (e.g., step 230) and may also determine the hierarchy oflinks between data fields and the properties and the operation typesassociated with those data fields. In some instances, this determinationinvolves utilizing the relational database schema to ascertain whichfields certain users may alter. Such information provides a mechanismfor defining privilege levels within the data source. At step 240, thesystem generates rules for accessing the database. These rules definewhat operations can be performed upon the data source and may, forinstance, define what type of information is in the database, how toobtain certain data within that database and what users are authorizedto access that data.

[0059] At step 250, the system obtains a set of configuration rules thatfunction at a layer above the rules for accessing the database. Theseconfiguration rules define a set of further constraints for interactingwith the data source. In one or more embodiments of the invention, thislatter step includes obtaining input from a developer through aspecialized tool for generating such configuration rules (e.g., thenetwork services assistant). The system can also obtain configurationinformation from other sources of data such as flat files, computerprograms, or LDAP servers. Once the system obtains input defining theconfiguration rules, the system can generate a set of configurationrules (see e.g., step 260) that determine the system's behavior atruntime. Configuration rules define, for example, whether a networkservice is to be made accessible to certain users and can provide a wayto control the level of accessibility to operations associated with eachnetwork service.

[0060] Network Services Assistant

[0061] Embodiments of the invention utilize a network services assistantconfigured to assist developers with the creation of the source coderequired to provide network services to requesting users. The networkservices assistant may, for instance, allow a developer to view the dataschema, determine what networks services are available, and implementthose services by configuring the operations and other propertiesassociated with each service. The network services assistant mayindependently perform one or more aspects of the functionality describeherein. In some case, for example, the term network services assistantand system are interchangeable in that the network services assistantmay, but is not required to, perform all or only some of the functionsdescribed as being performed by the network services assistant. Thus,the reader should note that the system itself or other software modulesindependent of the system can also perform the functions described asbeing performed by the network services assistant.

[0062] A. Obtaining a Data Source Schema

[0063]FIG. 3 depicts an example interface for providing schemainformation to assist with the configuration of network services. Theinterface comprises a set of display regions 310 that optionally containone or more other display elements (e.g. 320, 330 and 410). Each ofthese display elements or regions are rendered to present the developerwith a series of design choices. Display element 320, for instance,lists a set of network services (e.g. Web Services 322, 324, 326 and328) the developer may implement. The network services assistant alsoprovides a mechanism for inputting a database schema or simply providingconnection parameters to a data source. For example, by providing a username, password and database connection protocol (e.g. ODBC, JDBC) adeveloper may connect to a data source such as a relational database.Once the appropriate database is identified, the network servicesassistant connects to the database for purposes of retrieving thedatabase schema. In instances where a schema is not available, thenetwork services assistant applies a reverse engineering function to thedatabase in order to obtain the schema information.

[0064] Once obtained, the schema is displayed in display region 330. InFIG. 3, for instance, display region 330 contains three database tables.The network services assistant is capable of determining therelationships between one or more database tables and can traverse thehierarchy of tables to define network services that require the use ofmultiple tables. In FIG. 3, the assistant located two relationships: onebetween table 332 and table 334, and a second one between table 333 and334. Each table has a primary key (e.g. tbl_1_id, tbl_2_id and tbl_3_id)that is unique to each record in the table. Primary keys are furtherused to link records from two or more tables into an association table.For example, in FIG. 3 table 334 is an association table that allows thesystem to associate tables 332 and 333. The system utilizes theserelationships to determine the hierarchical structure of the fields in adatabase. Once the system determines such a structure, this relationalmapping is used to provide data needed for purposes of providing networkservices. If data from multiple tables is required, the system is ableuse the hierarchical structure to determine how and where to obtain therequired data.

[0065] B. Implementing Network Services

[0066] In addition to providing developers with an interface forobtaining and viewing data source information, the network servicesassistant allows developers to utilize a set of network services (e.g.,individual web services or a set of web services that make up atransaction). In one embodiment of the invention, the network servicesavailable to the developer are shown within display region 320. Theservices illustrated in FIG. 3, (e.g., services 322, 324, 326) provide away to access data fields (e.g., tbl_1_field_1, tbl_1_field_2),(tbl_1_field_1, tbl_2_field_4) and (tbl_1_field_2, tbl_2_field_3).

[0067] The network services assistant also allows the developer tocreate network services that manipulate data from the database. Networkservice 328, for instance, is designed to execute an operation thatreturns the sum of a particular data field or fields from one or moretables. To perform operations that utilize data from the database, thenetwork services assistant dynamically evaluates a set of predefinedrules, uses those rules to retrieve the data needed to perform theoperation, performs the operation and returns an appropriate result.

[0068]FIG. 4 shows an example of the graphical user interface componentsused to provide developers with the information needed to configure anetwork service. This is accomplished in one or more embodiments of theinvention through the use of a graphical user interface that contains aset of display regions designed to allow developers to create operationsrelating to a particular service. In the example given, display region410 shows a set of operations 402, 403, 404 and 405 that relate tosearching a given data source as well as inserting, deleting andupdating that data source.

[0069] The interface also provides developers with a mechanism forcontrolling the system's ability to define new operations associatedwith a particular service and add those new operations to thedevelopment process. For example, the developer may program a set ofroutines and add the routines to the default set of operationsassociated with each network service that has a use for such routines.

[0070] In addition to having the ability to manipulate operationsrelating to a network service, the system also provides users with a wayto handle properties associated with each defined operation. Anavailable set of properties associated with each operation are depicted,for example, within one or more components of the graphical userinterface. In the illustration contained herein, display region 410depicts properties 406, 407, 408 and 409. The properties are associatedwith a particular operation and define how the system behaves at runtimewhen executing the operation. An example of a simple property would be aproperty that indicates whether a particular operation is available ornot. For example, if a data field in a database may not be altered orerased through the use of a web service, update operation 405, anddelete operation 404 are simply flagged as “not available.” Theproperties own attributes may not only affect the way a system handles aclient's request, but also affect what type of response data isgenerated and how that data is transmitted to the client.

[0071] C. Generating Rule Sets

[0072] Once the data schema associated with the data source needed toperform a network service is obtained, a network service or set ofnetwork services are defined, and the developer sets the operations andproperties relating to the service, the network services assistantgenerates a set of rules stored in rules store (e.g. flat files loadedby a rule engine). In one or more embodiments of the invention theprocess of generating the rule is made fully automatic.

[0073]FIG. 5 illustrates the steps involved in the process of generatingrule sets that govern the creation and serving of network services. Atstep 510, the network services assistant obtains the database schemaassociated with the target data source (see e.g., step 210 describedabove). In one or more embodiments of the invention, the networkservices assistant utilizes a graphical user interface or some otherinterface, as described in FIG. 3, to capture user input and integratethat input with information collected from one or more data sources(e.g., the schema data). At step 520, the network services assistantanalyzes the database information by checking the data type associatedwith each field of the database, identifying links between the databasetables, and determining the hierarchical structure of the data in thedatabase. The network services assistant may then generate a set ofrules for querying the database (see e.g., step 530) and for modifyingor otherwise handling data fields in the database (see e.g. step 540).The system embodying one or more aspects of the invention can alsogenerate a set of operational rules for accessing the database. Theserules are typically stored in the rule store and used at runtime todetermine how and when to create one or more query objects in responseto a client request. When the system elects to create a query object,information such as database specific, table specific and field specificprivileges are typically examined. The operational rules define the typeof information that may be embedded in a query object and utilized whenaccessing the database to add, retrieve or alter data.

[0074] At step 560, the network services assistant generates a set ofoperational rules for translating the data into a format compatible withone or more destination protocols serving data to a requesting client.The system can, for instance, translate the data served in response to aclient request into Web Services Description Language. The data isfurther serialized for transmission to clients using one or morecommunication protocols. In one embodiment of the invention, thecommunication protocol of choice is SOAP. However, the system mayutilize any protocol capable of providing network services to transmitdata to the client.

[0075] Providing Network Services

[0076]FIG. 6 is a block diagram illustrating the processes involved inproviding network services utilizing one or more embodiments of theinvention. In the example that is given, client 150 issues a request fordata. A request converter 610 that utilizes one or more software modulesto analyze the request typically handles this request. The requestconverter may, for instance, verify the validity of a web service nameand determine if the appropriate parameters are passed with the requestand the requested operations. The request converter may also combinerequest information with data provided by the execution environment. Thesystem may, for instance, integrate session information and/orinformation obtained from electronic cookies with the request analysis.In an embodiment of the invention, the request converter parses SOAPformatted data received as XML text to convert the request data into arequest object.

[0077] An example of a type of request object is an object orientatedclass (e.g. JAVA coded class object) capable of storing request data,and enabled with one or more operations (e.g. mutators) invoked toretrieve the request data from the request object.

[0078] The request converter may utilize a rule engine 640 built usingartificial intelligence tools. In one embodiment of the invention, therule engine contains an inference engine capable of executing a chain oflogical steps using rule data obtained from one or more rule datasources (e.g. 130). The rule engine is configured to interface withmultiple system components and thereby allows the system to invoke therule engine at multiple levels and throughout different stages of thedata processing event. Moreover, operators of the system (e.g.developers, maintainers or even the end user) can modify one or morerule stores which result in the changes to the system's behavior withoutrequiring modifications to the rule engine's program code.

[0079] After the request converter creates a request object, a querygenerator 630 generates a query to obtain data from its data source(e.g. 120). The query generator invokes the rule engine to determine theconditions that apply to generating a query to a data source based onthe data source's access privilege parameters and the content of therequest object. For example, a request aimed at retrieving a person'spersonal data stored in a relational database would cause the querygenerator to invoke the rule engine to determine the client's accessprivileges and the access authorization parameters. The developer canexplicitly set these authorization parameters or the system canautomatically generate such parameters using access privileges stored inthe database. In embodiments of the invention, the query is an objectoriented class capable of storing data and enabled with operations. Thesystem may invoke these operations to retrieve data from the object oraccess data sources associated with the object.

[0080] Response generator 620 depicted in FIG. 6, represents a programmodule (or a set thereof) capable of converting the data obtained from adata source through the query object into response data suitable to betransmitted using one or more transmission protocols. Response generator620 contains one or more mechanisms for invoking rule engine 640 whichprovides response generator 620 with conditions to generate a response.Rule engine 640 may, for instance, determine on behalf of responsegenerator 620 that the responses for a specific network service are tobe transmitted in a specific protocol (or data format). For example,rule engine 640 may determine that all requests for data having fullread-access privileges in the database should be formatted in HTML.Response generator 620 could obtain data stored in object-orientedobjects and convert that data into the format designed for transmissionon a network.

[0081] In an embodiment of the invention, data obtained from queryingthe data source is converted to one or more objects represented in WebServices Description Language format. The latter objects are thenencoded using the SOAP format for transmission back to the client 150.

[0082]FIG. 7A and FIG. 7B illustrate the mechanism by which a systemembodying the invention provides network services. FIG. 7A is aflowchart illustrating steps involved in the process of providingnetwork services. The process begins by collecting information about thedata source and receiving a developer's input at step 710. This step istypically conducted using the network services assistant describedabove, although the system may manually obtain the information collectedas well as the developer's input or use one or more other developer'stools.

[0083] At step 720, embodiments of the invention generate descriptorsfor the network services the system is capable of utilizing. Thesenetwork service descriptors are a set of rules and templates that defineaspects of the network services to be provided. Such network servicedescriptors may, for instance, define a network service name, one ormore operations associated with the network service and rules that maydefine access privileges to the operations.

[0084] At step 730 a system embodying the invention generatesoperational rules that allow, for example, an engine to generatedatabase queries in response to a network services request and processresponse data as described above in FIG. 2. When generating a responseto a request, the rules are utilized to convert data from onerepresentation (e.g. relational database) into a format such as WebServices Description Language designed for data communications. At step740, the system receives a request from client 150 (see e.g., FIG. 6description). In its one implementation, the invention utilizes anapplication server (e.g. 155) that performs all steps of the presentinvention. However, alternative implementations are contemplated aswithin the scope of the invention defined herein. The invention may, forinstance, make use of software modules (sometime called plug-in modules)designed for implementation in third party application servers or anyother software program designed to provide network services.

[0085] At step 750, the system checks the operational rules discussedherein by invoking rule engine 640 and carrying out the processes,described in FIG. 6, for validating a request and converting thatrequest into an object oriented representation. The rules are typicallygenerated via a developer application such as the network servicesassistant described throughout. At step 760, the system generates aquery to access one or more data sources following a set of rules thatassociate data sources with network services. At step 770, the systemapplies the rule set by retrieving the data from one or more datasources, converting the data in accordance with one or morecommunication protocols and transmitting the data to the client.

[0086] Although the description set forth so far utilizes the termnetwork services, the reader should note that one or more embodiments ofthe invention are applied to providing a type of network service(s)called Web Service(s).

[0087] Handling a Request to a Web Service

[0088]FIG. 8A and FIG. 8B illustrate the process by which a systemembodying the invention handles requests made to a Web Service. At step810, the system receives a request from Web Service client 150. Arequest to a Web Service is an XML coded message, typically, using SOAP.The system can submit the message directly to a server through a networksocket or using HTTP. For example, the Web Service request may bereceived over HTTP as the following:

http://www.foo.ext/path/ServiceName?wsdl

[0089] Upon receipt of the request, the request message is directed to amodule (e.g., request handler 850) configured to enable the system tocommunicate with rule system 852. The rule system comprises a ruleengine 640, a rule store 130 and multiple components (not shown) thatallow the rule system to interface with other components in the system(e.g. an Application Server), or to integrate (as an embedded applet ora plug-in) within third party applications. Utilizing the capabilitiesof the rule system 852, the request handler 850 infers, using the nameof requested Web Service and the arguments contained in the request, thecomponent that is capable of generating the Web Service response. Atstep 820, the system instantiates the WSDL-generating component. Block854 represents the module that creates the WSDL-generating component.The latter is interfaced with the rule system 852, and is capable ofinferring the name of the operation to be invoked to generate a WebService response. At step 830, the WSDL-generating componentinstantiates one or more operations that allow the system to communicatewith data sources. Block 856 represents a process that enables theWSDL-generating component to instantiate the operations required togenerate the WSDL response. At step 840, the system generates the WSDL,while utilizing the rule system to determine the conditions associatedwith the WSDL-generation. The WSDL-generating component then returns theWSDL data to the system that, in turn, forwards the data to the client.

[0090]FIGS. 9A and 9B illustrate the process by which systems embodyingthe invention generate WSDL data. At step 910, the system utilizes therule system to infer the names of the components capable of handling therequest, and the names of all the operations in the service. At step920, the system infers, for each operation's name, which component is togenerate WSDL content. Modules 952 and 954 both interface with the rulesystem and are capable of invoking the rule system for inferringcomponent names and operations. At step 930, the system creates aninstance for each operation class found at step 920. At step 940, thesystem infers the WSDL data content values such as input names andtypes, output names and types, parameter ordering, operation name,schema types, binding name and all other information that the systemrequires to execute the operations and generate the WSDL content. Thelatter step allows the system to condition the WSDL output without hardcoding the WSDL generation specifications in the WSDL generationcomponent itself as it is common use in prior art. In the invention WSDLgeneration rules are input in the rule system. The latter approachallows for a greater flexibility in the system's behavior. Thus, usersof the system are not required to manually create WSDL to initiate a WebService.

[0091] At step 950, the system executes the operations having contentspecific to each one of the operations. At step 960, the WSDL-generatingcomponent merges the WSDL content from each component into a servicewide WSDL document to be returned to the client.

[0092] Handling a Web Service Invocation

[0093]FIG. 10A and FIG. 10B illustrate the process by which a systemembodying one or more aspects of the invention handles the invocation ofa Web Service. Before invoking a Web Service operation the systemreceives a SOAP message, or an HTTP request, from a Web Services client(e.g., step 1010). A typical example of an instance where Web Servicesare applicable involves a creating a request to search a database. Therequest may be a Uniform Resource Locator (URL) that contains the nameof the Web Service and one or more parameters indicating, for instance,a search word or phrase. The request may also contain output parameters,such as sorting information or a search category. Block 1051 representsone or more application server modules for handling the receipt ofnetwork connections and forwarding of requests to the proper requesthandler. At step 1020, the application server determines whether therequest is destined to a Web Service. If the request does not target aWeb Service, the application server forwards the request to the properserver component for handling requests of that type. If the requesttargets a Web Service, the application server routes the request to aSOAP processor 1052. In one embodiment of the invention, SOAP processor1052 is an application component capable of parsing the message encodedin accordance with SOAP (which utilizes XML), and converts the data intodata structures, objects and classes (e.g., in an object orientedsense). In one embodiment of the invention, SOAP processor 1050 containsAXIS software (developed by the APACHE Group).

[0094] SOAP processor 1050 extracts a SOAP message from the HTTP request(e.g., step 1030) and converts the SOAP request message into requestobjects. The conversion process involves a rule-basedserializer/deserializer 1054, which is a module that is interfaced withthe rule system. Serialization refers to the process that enables thesystem to convert blocks of structured data (e.g. data structures,classes etc) into streams of data. Systems frequently utilize theprocess of serialization to transfer data between the different nodes ina network. The deserialization process does the opposite by assemblingstreamed data into structured blocks of data. The deserializer of block1054, receives SOAP information and converts it into structured dataunder control of the rule system.

[0095] At step 1050, a system embodying the invention invokes a dynamicWeb Service Handler 1056 while submitting arguments such as the servicename, operation name, request objects created in the previous step, andother information provided by the application server (e.g., such assession information). At step 1060, the system executes one or moreoperations and typically retrieves data from one or more data sources.The result of executing the operations is an array of model dataobject(s).

[0096] Once obtained, the system returns these data objects to SOAPprocessor 1052 (e.g., step 1070) which utilizes serializer 1054 toconvert data from object based data to streamed data. SOAP processor1052 handles the streamed data by converting that data into XML. SOAPprocessor 1054 has the ability to invoke the rule system and therebyallow the system to exert control over the way data in preparation fortransmission over the network. At step 1080, the system returns the datain its serialized form to one or more Web Services clients.

[0097]FIGS. 11A and 11B illustrate the process by which a systemembodying the invention dynamically handles Web Service objects as wellas the creation and execution of operations objects. FIGS. 11A and 11Bfurther expand upon the description relating to step 1050 shown in FIG.10A. At step 1110, the system invokes a dynamic Web Service handler 1152with arguments as described above.

[0098] At step 1120, the Web Service handler infers the class name ofthe operation handler 1154 defined for this invocation and someenvironment settings (e.g., entity name, task and service name). At step1130, the system instantiates the corresponding class for one or moretarget operations. Operation handler 1154 interfaces with rule system956 and can thereby utilize the rule system to supervise classinstantiation and the execution of the various operations. Through therule system, the operation handler 1154 has access to invocationparameters and variables such as the mapping between the public name ofattributes (exposed as arguments) and the corresponding internal namesused for data manipulation. Operation handler 1154 can also obtain thevalue of arguments used to invoke the operation.

[0099] Rule system 956 also provides object entity types identifying thesort of objects the operation is intended to work with. Providing targetentity types is important because it allows system components to utilizea single class to handle multiple different entity types. For example,in a system referred to as Direct to WebServices™, one class a series ofoperations (e.g., search, insert, delete, and update) is invoked toautomatically handle many different types of entities. Furthermore,operation handler 1154, is able to determine, through the rule system,whether to immediately commit (or not commit) changes to its objectgraph. The system then executes the operations (e.g., step 1140) andreturns the results of the execution to the SOAP processor (e.g., step1150).

[0100]FIG. 12A and FIG. 12B illustrate the process by which a systemembodying the invention utilizes rule based serializers anddeserializers. As was noted above, serialization is an important aspectfor network communications. At step 1210, the SOAP processor invokes adeserializer 1254 to unmarshall data objects referred to in oneembodiment of the invention as Enterprise Objects. At The deserializerutilizes rule system 956 to infer a mapping between Web Service inputpart names and entity attributes (e.g., step 1220) and returns thedeserialized object models to the SOAP processor (e.g., at step 1230).

[0101] At step 1240, the system invokes the dynamic Web Service handlerwith input part values (including deserialized model objects). At step1250, the result object(s) of the web service invocation are returned tothe SOAP processor for serialization (e.g., step 1252). Serializer 1252is interfaced with the rule system and can thereby convert resultobjects into XML using a set of serialization rules. The rule-basedserializer can infer the conditions for data serialization at multiplesteps. For example, the serializer infers which attributes to serialize,the mapping of an entity attribute name to XML property name, the orderin which to serialize properties, and any other serialization rule inputby a developer or a user into the rule system. The SOAP processor hasthe ability to generate one or more SOAP messages (e.g., step 1260) andcan return generated SOAP messages to the client (e.g., step 1270).

[0102] Thus a method, system and apparatus for automatically providingnetwork services (e.g. Web Services) has been described. The inventionimproves upon existing methods for providing network services byreducing the time and effort required to initiate use of these networkservices. A developer can, for instance, automatically generate severaldifferent types of rules and use those rules with a rule systeminterfaced with one or more application server components. Thus, thesystem provides a way to control how requests to network services arehandled, data is retrieved from data sources and manipulated, and outputis generated.

What is claimed is:
 1. A network services assistant embodied in acomputer program executed in a tangible medium of expression saidcomputer program comprising computer program code configured to: obtaina database schema of a database; analyze said database schema todetermine a hierarchical structure within a plurality of database fieldsin said database; generate a set of operation rules for utilizing saiddatabase fields; generate a set of operation rules for translating anoutput of a query to said database into one of a plurality of datacommunication languages.
 2. The network services assistant of claim 1wherein said computer program code configured to analyze said databaseschema further comprises computer program code configured to provide anobject description for building entities to store data.
 3. The networkservices assistant of claim 1 wherein said computer program codeconfigure to analyze said database schema further comprises computerprogram code configured to provide an object description for accessingdata in said database.
 4. The network services assistant of claim 1wherein said computer program code configure to analyze said databaseschema further comprises computer program code configured to generate ahierarchical structure involving multiple database tables.
 5. Thenetwork services assistant of claim 1 wherein said computer program codeis further configured to generate a set of operation rules for queryingsaid database fields.
 6. The network services assistant of claim 5wherein said computer program code configured to generate said set ofoperation rules for querying said database fields further comprisescomputer program code configured to provide a data type for each of saiddatabase fields.
 7. The network services assistant of claim 1 whereinsaid computer program code is further configured to generate a set ofoperation rules for modifying said database fields.
 8. The networkservices assistant of claim 7 wherein said computer program codeconfigured to generate said set of operation rules for modifying saiddatabase fields comprises computer program code configured to providecontrols for handling database transactions.
 9. The network servicesassistant of claim 1 wherein said computer program code is furtherconfigured to generate a set of operation rules for accessing saiddatabase fields.
 10. The network services assistant of claim 9 whereinsaid computer program code configured to generate said set of operationrules for accessing said database fields further comprises computerprogram code configured to handle user privileges at run time.
 11. Thenetwork services assistant of claim 1 wherein said computer program codeconfigured to generate a set of operation rules for translating saidoutput further comprises computer program code configured to generatedata compatible with SOAP.
 12. The network services assistant of claim 1wherein said computer program code configured to generate a set ofoperation rules for translating said output further comprises computerprogram code configured to generate data compatible with Web ServicesDescription Language.
 13. A method for providing web servicescomprising: analyzing a schema of a data source; generating a pluralityof descriptors for a plurality of web services based on said schema;generating a plurality of operational rules associated with saidplurality of web services; and providing one of said plurality of webservices upon receiving a request containing at least one of saidplurality of descriptors, by executing said plurality of operationalrules, building a request for accessing said data source, accessing saiddata source and returning data in a data form based on a web servicesprotocol.
 14. The method of claim 13 wherein said data source furthercomprises a relational database having a plurality of tables and aplurality of relationships linking said plurality of tables.
 15. Themethod of claim 13 wherein said data source further comprises a datasource using directory services.
 16. The method of claim 13 wherein saidgenerating a plurality of descriptors further comprises generating apublishable name to describe each one of said plurality of web services.17. The method of claim 13 wherein said generating a plurality ofdescriptors further comprises automatically generating a set ofoperations for accessing said plurality of web services.
 18. The methodof claim 17 wherein said automatically generating a set of operationsfurther comprises automatically generating a set of functions foraccessing said data source.
 19. The method of claim 18 wherein said setof functions further comprises at least one function for adding data tosaid data source.
 20. The method of claim 18 wherein said set offunctions further comprises at least one function for deleting data fromsaid data source.
 21. The method of claim 13 wherein said generatingsaid plurality of operational rules further comprises generating a setof conditional statements each of which are combined with an executionstatement.
 22. The method of claim 13 wherein said plurality ofoperational rules comprises a hierarchical structure defining theprecedence of each rule within said plurality of operational rules. 23.A method for automatically providing web services comprising: receivinga request comprising a web service and at least one argument datum;generating a request object; checking said request object against aplurality of operational rules using a rule engine; generating a queryto a data source; obtaining data from said data source by submittingsaid query; building a response data entity; generating a responseobject; generating response data while utilizing said rule engine; andtransmitting said response data to said client.
 24. The method of claim23 wherein said receiving said request further comprises receiving afunction name and zero or more arguments.
 25. The method of claim 23wherein said receiving said request further comprises receiving an aliasassociated with said web service.
 26. The method of claim 23 whereinsaid receiving said request further comprises determining whether saidrequest requires dynamic handling.
 27. The method of claim 23 whereinsaid receiving said request further comprises examining a headercontained in said request, said header bearing information forrequesting access to said web service.
 28. The method of claim 23wherein said request object further comprises a data structure forstoring request information contained in said request.
 29. The method ofclaim 28 wherein said request object further comprises at least onefunction for accessing and manipulating said request information. 30.The method of claim 23 wherein said performing said checking furthercomprises verifying a name of said web service.
 31. The method of claim23 wherein said performing said checking further comprises verifying atype for said zero or more arguments.
 32. The method of claim 23 whereinsaid building said response data entity further comprises generatingsaid data entity using web services description language.